package com.wysql.ascost.model;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * @title: ResponseEnum
 * @projectName: production-cost
 * @author: Zhang Jian
 * @date: 2023年07月21日 15:47
 */
@Getter
@AllArgsConstructor
@ToString
public enum ResponseEnum {

    SUCCESS(200, "操作成功"),
    ERROR(10000, "服务器内部错误"),
    //-1xx 服务器错误
    BAD_SQL_GRAMMAR_ERROR(10101, "sql语法错误"),
    SERVLET_ERROR(10102, "servlet请求异常"), //-2xx 参数校验
    UPLOAD_ERROR(10103, "文件上传错误"),
    EXPORT_DATA_ERROR(10104, "数据导出失败"),


    //-2xx 参数校验
    BORROW_AMOUNT_NULL_ERROR(10201, "借款额度不能为空"),
    MOBILE_NULL_ERROR(10202, "手机号码不能为空"),
    MOBILE_ERROR(10203, "手机号码不正确"),
    NANME_NULL_ERROR(10204, "用户名不能为空"),
    PASSWORD_NULL_ERROR(10205, "密码不能为空"),
    CODE_NULL_ERROR(10206, "验证码不能为空"),
    CODE_ERROR(10207, "验证码错误"),
    MOBILE_EXIST_ERROR(10208, "手机号已被注册"),
    LOGIN_MOBILE_ERROR(10209, "用户不存在"),
    LOGIN_PASSWORD_ERROR(10210, "密码错误"),
    LOGIN_LOKED_ERROR(10211, "用户被锁定"),
    LOGIN_AUTH_ERROR(10212, "未登录"),
    NAME_OR_PASSWORD_ERROR(10214, "用户名或密码不正确，请核对后重新尝试"),


    USER_BIND_IDCARD_EXIST_ERROR(10301, "身份证号码已绑定"),
    USER_NO_BIND_ERROR(10302, "用户未绑定"),
    USER_NO_AMOUNT_ERROR(10303, "用户信息未审核"),
    USER_AMOUNT_LESS_ERROR(10304, "您的借款额度不足"),
    LEND_INVEST_ERROR(10305, "当前状态无法投标"),
    LEND_FULL_SCALE_ERROR(10306, "已满标，无法投标"),
    NOT_SUFFICIENT_FUNDS_ERROR(10307, "余额不足，请充值"),

    PAY_UNIFIEDORDER_ERROR(10401, "无访问权限，请登录后重新尝试"),

    ALIYUN_SMS_LIMIT_CONTROL_ERROR(10502, "短信发送过于频繁"),//业务限流
    ALIYUN_SMS_ERROR(10503, "短信发送失败"),//其他失败

    WEIXIN_CALLBACK_PARAM_ERROR(10601, "回调参数不正确"),
    WEIXIN_FETCH_ACCESSTOKEN_ERROR(10602, "获取token失败"),
    WEIXIN_FETCH_USERINFO_ERROR(10603, "获取用户信息失败"),
    TOKEN_EXPIRED_ERROR(10604, "token已过期，请重新登陆");

    //响应状态码
    private final Integer code;
    //响应信息
    private final String msg;


}
